﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace TetrisService
{
    /// <summary>
    /// Each objetc of this class represents a block in the game board.
    /// </summary>
    public class TetrominoBlock
    {
        private int x;
        private int y;

        public TetrominoBlock(int x, int y)
        {
            this.x = x;
            this.y = y;
        }

        /// <summary>
        /// Gets the X, Which is used for keep the coordinate X of the block on the game board.
        /// </summary>
        /// <returns></returns>
        public int getX()
        {
            return x;
        }

        /// <summary>
        /// Gets the Y, Which is used for keep the coordinate Y of the block on the game board.
        /// </summary>
        /// <returns></returns>
        public int getY()
        {
            return y;
        }

        /// <summary>
        /// Adds the X coordinate to the provided value.
        /// </summary>
        /// <param name="value">The value.</param>
        public void addX(int value)
        {
            this.x += value;
        }

        /// <summary>
        /// Adds the Y coordinate to the provided value.
        /// </summary>
        /// <param name="value">The value.</param>
        public void addY(int value)
        {
            this.y += value;
        }

        /// <summary>
        /// Sets the X coordinate.
        /// </summary>
        /// <param name="x">The x.</param>
        public void setX(int x)
        {
            this.x = x;
        }

        /// <summary>
        /// Sets the Y coordinate.
        /// </summary>
        /// <param name="y">The y.</param>
        public void setY(int y)
        {
            this.y = y;
        }
    }
}